<template>
  <div>
      <!-- :scroll="{ x: 'max-content', y: 240 }" { x: 2200, y: 540 }-->
    <b-table
      ref="table"
      :columns="columns"
      :request="loadData"
      :scroll="scroll"
      :select-config="{ use: true, type: 'checkbox', rowKey: 'listId' }"
      :isShowTotal="false"
      :showPage="false"
      :isShowCountBar="false"
      :outSelectedRowKeys="selectedRow.map(v => v.listId)"
      @select-click="(e) => (selectedRow = e.rows)"
      :customRow="customRow"
      bordered
    >
      <template #prefix="data" v-if="type!=='look'">
        <a-button type="primary" :disabled="!arrtId" @click="showAddModal('add')" >新增</a-button >
        <a-button type="primary" :disabled="selectedRow.length!==1" @click="showAddModal('edit')" >编辑</a-button >
        <a-button type="primary" :disabled="selectedRow.length==0" @click="del" >删除</a-button >
        
        <ExcelImportButton
          v-if="type =='add'"
          :disabled="!arrtId"
          ref="excelImportButton"
          :loading="loadingImport"
          icon="import"
          button-text="导入"
          @handleSubmit="handleImport"
        />
        <ExportExcel
          v-if="type =='add'"
          :disabled="!arrtId"
          ref="exportExcel"
          :export-list="exportList"
          :loading="loadingExport"
          icon="export"
          :file-name="'成本价格信息模板.xlsx'"
          button-text="下载模板"
        />
          <!-- :beforeDownload="beforeDownload" -->
        <a-button type="primary" v-if="type =='fill'" :disabled="!tableList.length" @click="save" >保存</a-button >
      </template>
      
      <span slot="serial" slot-scope="text, record, index">{{ index + 1 }}</span>
      
      <template slot="signFee" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.signFee" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.signFee = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
      <template slot="signTime" slot-scope="text, record, index">
        <a-date-picker v-if="record.fillInData" :value="record.fillInData.signTime"
          :disabled="record.fillInData['disabled']"
          :default-picker-value="moment().format('YYYY-MM-DD')"
          format="YYYY-MM-DD"
          valueFormat="YYYY-MM-DD"
          class="requiredFormItem"
          @change="(e) => {record.fillInData.signTime = e, $refs.table.refresh()}"
        ></a-date-picker>
      </template>
      <template slot="introduceInfo" slot-scope="text, record, index">
        <baseInput v-if="record.fillInData" v-model="record.fillInData.introduceInfo"  :disabled="record.fillInData['disabled']"></baseInput>
      </template>
      
      <template slot="mainMaterialLossRateInfo" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.mainMaterialLossRateInfo" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.mainMaterialLossRateInfo = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
      <template slot="laborCostInfo" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.laborCostInfo" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.laborCostInfo = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
      <template slot="comprehensiveUnitPriceInfo" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.comprehensiveUnitPriceInfo" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.comprehensiveUnitPriceInfo = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
      
      <template slot="auxiliaryMaterialFeeInfo" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.auxiliaryMaterialFeeInfo" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.auxiliaryMaterialFeeInfo = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
      <template slot="comprehensiveUnitPriceInfo" slot-scope="text, record, index">
        <baseInputNumber v-if="record.fillInData" v-model="record.fillInData.comprehensiveUnitPriceInfo" :disabled="record.fillInData['disabled']" :min="0" :precision="2" class="requiredFormItem"
          @change="(e) => { record.fillInData.comprehensiveUnitPriceInfo = e, $refs.table.refresh()}"
        ></baseInputNumber>
      </template>
    </b-table>
    
    <DialogForm
      ref="dialogForm"
      edit-model="E"
      :custom-footer="true"
      :isEmit="false"
      :visible.sync="visible"
      :header-title="'新增'"
      :width="650"
      :form="dialogForm"
      :forms.sync="dialogForm"
      :form-list="formList"
      :rules="rules"
      @confirm="formChange">
      
      <template slot="footer" v-if="editable">
        <a-button class="mr10p" :disabled="loading.dialogLoading" @click="visible=false"> 取消 </a-button>
        <a-button type="primary" :loading="loading.dialogLoading" @click="handleOk"> 提交 </a-button>
      </template>
    </DialogForm>
  </div>
  </template>
<script>
import DialogForm from '@/components/DialogForm' // 弹窗
import ExportExcel from '@/components/exportExcel/ExportExcel' // 导出
import { tableColumns } from './costPriceTable.js'
import debounce from 'lodash/debounce';

export default {
  name:'ConstPriceTable',
  components: {
    DialogForm,
    ExportExcel
  },
  data() {
    // this.columns = columns
    return {
      // tableList: [
      //   {
      //     id: new Date().getTime(),
      //     partAndProject: '分部分项',
      //     featureDesc: '特征描述',
      //     jobContent: '工作内容',
      //     projectCountRules: '工程量计算规则',
      //     materialAndMechanicalEquipmentSupply: '材料及机械设备供应',
      //     companyControlFeeNotIncludeFex: '公司控制价（不含税）(元)',
      //     unitOfMeasurement: '计量单位',
      //   }
      // ],
      tableList: [],
      selectedRow: [],
      visible: false,
      editable: true,
      loadingExport: false,
      loadingImport: false,
      dialogForm: {},
      dialogFormType: 'add',
      // rules: {
      //   partAndProject: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   featureDesc: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   jobContent: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   projectCountRules: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   materialAndMechanicalEquipmentSupply: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   unitOfMeasurement: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   companyControlFeeNotIncludeFex: [{ required: true, message: '请输入', trigger: 'blur' }],
        
      //   mainMaterialLossRate: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   laborCost: [{ required: true, message: '请输入', trigger: 'blur' }],
      //   comprehensiveUnitPrice: [{ required: true, message: '请输入', trigger: 'blur' }],
        
      //   auxiliaryMaterialFee: [{ required: true, message: '请输入', trigger: 'blur' }],
      // },
      loading: {
        dialogLoading: false
      },
      loadData: async (param) => {
          return new Promise((resolve, reject) => {
            // console.log({data: this.tableList,})
              resolve({
                  code: 200,
                  data: this.tableList,
              })
          })
      },
      timer: null
    }
  },
  props: {
    arrtId: {
      type: [String, Number, Array]
    },
    companyType: {
      type: String,
      default: function() {
        return 'normal'
      }
    },
    datas: {
      type: Array,
      default: function () {
        return []
      }
    },
  },
  computed: {
    columnsExport() {
      let columnsExport = this.$clone(this.columns)
      let expColums = []
      for (let i = 0; i < columnsExport.length; i++) {
        let item = columnsExport[i]
        if (item.children) {
          item.children.forEach((v) => {
            v.title += '*'
            expColums.push(v)
          })
        } else {
          if (item.dataIndex !== 'remark') {
            item.title += '*'
          }
          expColums.push(item)
        }
      }
      return expColums
    },
    exportList() {
      return [{
        columns: this.columnsExport,
        datas: [{}]
      }]
    },
    scroll() {
      let x = 1200, y = 240;
      if (this.type == 'add' || this.type == 'edit') {
        if (this.companyType == 'normal') {
          // x = 1500
        }
      } else if (this.type == 'look') {
        let num = 0
        if (this.companyType == 'normal') {
          num = (this.columns.length - 12) * 360
        } else if (this.companyType == 'install') {
          num = (this.columns.length - 8) * 360
        } else {
          num = (this.columns.length - 12) * 500 + 800
        }
        x = 2200 + num
      } else if (this.type == 'fill') {
        if (this.companyType == 'normal') {
          x = 2500
        } else if (this.companyType == 'install') {
          x = 2500
        } else {
          x = 2800
        }
      }
      return { x, y }
    },
    formList() {
      if (this.companyType == 'normal') {
        return [
          {
            type: 'a-input',
            keyName: 'partAndProject',
            label: '分部分项',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'featureDesc',
            label: '特征描述',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'jobContent',
            label: '工作内容',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'projectCountRules',
            label: '工程量计算规则',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'materialAndMechanicalEquipmentSupply',
            label: '材料及机械设备供应',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input',
            keyName: 'unitOfMeasurement',
            label: '计量单位',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'companyControlFeeNotIncludeFex',
            label: '公司控制价（不含税）（元）',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'remark',
            label: '备注',
            disabled: !this.editable,
            span: 22,
          },
        ]
      } else if (this.companyType == 'install') {
        return [
          {
            type: 'a-input',
            keyName: 'partAndProject',
            label: '分部分项',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'featureDesc',
            label: '特征描述',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'projectCountRules',
            label: '工程量计算规则',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'materialAndMechanicalEquipmentSupply',
            label: '材料及机械设备供应',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'mainMaterialLossRate',
            label: '主材耗损率',
            disabled: !this.editable,
            span: 22,
            precision: 2,
            attrs: {
              min: 0
            },
          },
          {
            type: 'a-input',
            keyName: 'unitOfMeasurement',
            label: '计量单位',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'laborCost',
            label: '人工费(元)',
            placeholder: '<=综合单价',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
            change: debounce((val) => {
              if (this.companyType == 'install' && this.dialogForm.comprehensiveUnitPrice && val > this.dialogForm.comprehensiveUnitPrice) {
                this.$message.error('人工费(元)应 <= 综合单价（元）')
                this.dialogForm.laborCost = this.dialogForm.comprehensiveUnitPrice
              }
            }, 800)
          },
          {
            type: 'a-input-number',
            keyName: 'comprehensiveUnitPrice',
            label: '综合单价（元）',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
            change: debounce((val) => {
              if (this.companyType == 'install' && val < this.dialogForm.laborCost) {
                this.$message.error('综合单价（元）应 >= 人工费(元)')
                this.dialogForm.comprehensiveUnitPrice = this.dialogForm.laborCost
              }
            }, 800)
          },
          {
            type: 'BaseTextarea',
            keyName: 'remark',
            label: '备注',
            disabled: !this.editable,
            span: 22,
          },
        ]
      } else {
        return [
          {
            type: 'a-input',
            keyName: 'partAndProject',
            label: '分部分项',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'featureDesc',
            label: '特征描述',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'jobContent',
            label: '工作内容',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'projectCountRules',
            label: '工程量计算规则',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'materialAndMechanicalEquipmentSupply',
            label: '材料及机械设备供应',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input',
            keyName: 'unitOfMeasurement',
            label: '计量单位',
            disabled: !this.editable,
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'laborCost',
            label: '人工费(元)',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'auxiliaryMaterialFee',
            label: '辅材费（元）',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
          },
          {
            type: 'a-input-number',
            keyName: 'comprehensiveUnitPrice',
            label: '综合单价（元）',
            disabled: !this.editable,
            precision: 2,
            attrs: {
              min: 0
            },
            span: 22,
          },
          {
            type: 'BaseTextarea',
            keyName: 'remark',
            label: '备注',
            disabled: !this.editable,
            span: 22,
          },
        ]
      }
    },
    type() {
      return this.$route.query.pageType || 'look'
    },
    rules() {
      if (this.type == 'fill') {
        return {
          partAndProject: [{ required: true, message: '请输入', trigger: 'blur' }],
          featureDesc: [{ required: true, message: '请输入', trigger: 'blur' }],
          jobContent: [{ required: true, message: '请输入', trigger: 'blur' }],
          projectCountRules: [{ required: true, message: '请输入', trigger: 'blur' }],
          materialAndMechanicalEquipmentSupply: [{ required: true, message: '请输入', trigger: 'blur' }],
          unitOfMeasurement: [{ required: true, message: '请输入', trigger: 'blur' }],
        }
      } else {
        return {
          partAndProject: [{ required: true, message: '请输入', trigger: 'blur' }],
          featureDesc: [{ required: true, message: '请输入', trigger: 'blur' }],
          jobContent: [{ required: true, message: '请输入', trigger: 'blur' }],
          projectCountRules: [{ required: true, message: '请输入', trigger: 'blur' }],
          materialAndMechanicalEquipmentSupply: [{ required: true, message: '请输入', trigger: 'blur' }],
          unitOfMeasurement: [{ required: true, message: '请输入', trigger: 'blur' }],
          companyControlFeeNotIncludeFex: [{ required: true, message: '请输入', trigger: 'blur' }],
          
          mainMaterialLossRate: [{ required: true, message: '请输入', trigger: 'blur' }],
          laborCost: [{ required: true, message: '请输入', trigger: 'blur' }],
          comprehensiveUnitPrice: [{ required: true, message: '请输入', trigger: 'blur' }],
          
          auxiliaryMaterialFee: [{ required: true, message: '请输入', trigger: 'blur' }],
        }
      }
    },
    columns() {
      if (this.type == 'look') {
        let otherHead = []
        this.tableList = this.tableList.map((item, index) => {
          let fillData = item.fillInDataList
          if (fillData.length) {
            fillData.forEach((e) => {
              if (e.projectId && e.projectName) {
                item[e.projectId] = e;
                let has = otherHead.find((i) => {
                  return i.dataIndex == e.projectId
                })
                if (!has) {
                  let childMap = {
                    normal: [
                      {
                        title: '签约价（不含税）（元）',
                        dataIndex: `${e.projectId}.signFee`
                      },
                      {
                        title: '签约日期',
                        dataIndex: `${e.projectId}.signTime`
                      },
                      {
                        title: '与公司控制价清单差异',
                        dataIndex: `${e.projectId}.introduceInfo`,
                        width: '240px',
                      }
                    ],
                    install: [
                      {
                        title: '主材损耗率',
                        dataIndex: `${e.projectId}.mainMaterialLossRateInfo`
                      },
                      {
                        title: '签约人工费（不含税）（元）',
                        dataIndex: `${e.projectId}.laborCostInfo`
                      },
                      {
                        title: '签约综合单价（不含税）(元)',
                        dataIndex: `${e.projectId}.comprehensiveUnitPriceInfo`
                      },
                      {
                        title: '合同签约日期',
                        dataIndex: `${e.projectId}.signTime`
                      },
                      {
                        title: '与公司控制价清单是否有差异（特征、工作内容、甲供材、计算规则等）简要说明',
                        width: '240px',
                        dataIndex: `${e.projectId}.introduceInfo`
                      },
                    ],
                    decorate: [
                      {
                        title: '签约人工费元（不含税）（元）',
                        dataIndex: `${e.projectId}.laborCostInfo`
                      },
                      {
                        title: '签约辅材费元（不含税）(元)',
                        dataIndex: `${e.projectId}.auxiliaryMaterialFeeInfo`
                      },
                      {
                        title: '签约税前单价(元)',
                        dataIndex: `${e.projectId}.comprehensiveUnitPriceInfo`
                      },
                      {
                        title: '合同签约日期',
                        dataIndex: `${e.projectId}.signTime`
                      },
                      {
                        title: '与公司控制价清单是否有差异（特征、工作内容、甲供材、计算规则等）简要说明',
                        width: '240px',
                        dataIndex: `${e.projectId}.introduceInfo`
                      },
                    ]
                  }
                  otherHead.push({
                    title: e.projectName,
                    dataIndex: `${e.projectId}`,
                    children: childMap[this.companyType]
                  })
                }
              }
            })
          }
          return item
        })
        let colums = [
          ...tableColumns[this.companyType][this.type],
          ...otherHead
        ]
        return colums
      } else if (this.type == 'fill') {
         return tableColumns[this.companyType][this.type] || []
      } else {
        return tableColumns[this.companyType]['add'] || []
      }
      return tableColumns[this.companyType][this.type] || []
    },
  },
  watch: {
    arrtId() {
      // console.log(this.arrtId)
    },
    tableList: {
      immediate: true,
      handler(val) {
      },
      deep: true
    },
    datas: {
      immediate: true,
      handler(val) {
        if (this.type == 'fill') {
          this.tableList = this.datas.map((item, index) => {
            let isFilled = item.fillInDataList?.find((e) => e.projectId == this.$currentPost().id)
            if (!item.fillInData) {
              item.fillInData = !!isFilled ? {
                ...isFilled,
              } : {
                auxiliaryMaterialFeeInfo: undefined,
                comprehensiveUnitPriceInfo: undefined,
                laborCostInfo: undefined,
                mainMaterialLossRateInfo: undefined,
                signFee: undefined,
                signTime: undefined,
                introduceInfo: undefined,
              }
            }
            return item
          })
          
        } else if (this.type == 'edit') {
          this.tableList = this.datas.map((item, index) => {
            // item.listId = item.id
            // delete item.id
            // delete item.fillInDataList
            return item
          })
        } else {
          this.tableList = this.datas
        }
          this.$refs.table && this.$refs.table.refresh()
      },
      deep: true
    },
    isAudit: {
        immediate: true,
        handler(val) {
            // if (val) {
            //     this.$nextTick(() => {
            //         // this.pageType = 'look'
            //     })
            // }
        },
    },
  },
  created() {
  },
  mounted() {
    // console.log(this.$refs.table)
  },
  methods: {
    async beforeDownload() {
      
    },
    handleImport(list) {
      let form = []
      console.log(list)
      let columnsExport = this.$clone(this.columnsExport)
      let errList = []
      // 遍历校验表格字段，且添加表单
      for (let i = 0; i < list.length; i ++) {
        
        form.push({})
        let keys = list[i]
        let listItem = form[i]
        listItem.listId = new Date().getTime().toString() + `_${i}`
        columnsExport.forEach((item, index) => {
          let key = item.dataIndex
          let title = item.title
          let value = keys[title]
          let dataType = item.dataType
          let errkey = (Number(i) + 1)
          if (!item.isHidden) {
            if (key == 'remark') {
              listItem[key] = value
            } else {
              if (!value) {
                errList.push(`第${Number(i) + 1}行【${title.replace('*', '')}】不能为空`)
              } else {
                try {
                  if (dataType && isNaN(Number(value))) {
                    errList.push(`第${Number(i) + 1}行【${title.replace('*', '')}】格式错误`)
                  } else {
                    listItem[key] = value
                  }
                } catch (e) {
                }
              }
            }
          }
        })
      }
      
      console.log(form)
      console.log(errList)
      if (errList.length) {
        this.$notification.error({
          message: '提示',
          description:
            `${errList.join('、')}`,
        });
        return
      }
      this.tableList = [...form]
      this.$emit('listChange', this.tableList)
      this.$refs.table.refresh()
    },
    customRow(record, rowkey) {
      // console.log(record, rowkey)
      return {
        on: { // 事件
          click: (event) => {},       // 点击行
          dblclick: (event) => {
            this.showAddModal('look', record)
          },
          contextmenu: (event) => {},
          mouseenter: (event) => {
            // if (!this.timer) {
            //   this.timer = setTimeout(() => {
            //     console.log(event)
            //     this.showAddModal('look', record)
            //   }, 1000)
            // }
          },  // 鼠标移入行
          mouseleave: (event) => {
            // this.timer = null
          }
        },
  
      };
    },
    inputChange(e) {
      console.log(this.tableList)
    },
    showAddModal(type, row) {
      this.dialogFormType = type
      if (type =='add') {
        // this.dialogForm = this.type == 'fill' ? {
        //   fillInData: {
        //     signFee: undefined,
        //     signTime: undefined,
        //     introduceInfo: undefined,
        //   }
        // } : {};
        this.dialogForm = {}
        this.editable = true
        this.$checkRequireItem()
      } else if (type == 'edit') {
        if (this.selectedRow.length !== 1) {
          this.$message.error('请选择一条数据编辑！')
          return
        }
        let rowData = this.selectedRow[0]
        this.dialogForm = rowData
        this.editable = true
        this.$checkRequireItem()
      } else {
        this.dialogForm = row
        this.editable = false
      }
      this.visible = true
    },
    formChange(data) {
      if (this.dialogFormType == 'add') {
        data.listId = new Date().getTime().toString()
        this.tableList.push(data)
      } else {
        this.tableList = this.tableList.map((item, index) => {
          if (item.listId == data.listId) {
            item = data
            console.log(item)
          }
          return item
        })
      }
      this.visible = false
      this.$emit('listChange', this.tableList)
      this.$refs.table.refresh()
    },
    handleOk() {
      this.$refs.dialogForm.handleOk()
    },
    del() {
      let that = this
      that.$confirm({
          title: '温馨提示',
          content: '确定是否删除数据？',
          okText: '确认',
          okType: 'danger',
          cancelText: '取消',
          onOk() {
              return new Promise((resove, reject) => {
                that.tableList = that.tableList.filter((item, index) => {
                  return !that.selectedRow.find((e) => e.listId == item.listId)
                })
                that.$message.success('删除成功！')
                that.selectedRow = []
                // that.$refs.table.refresh()
                that.$emit('listChange', that.tableList)
                resove()
              })
          },
      })
    },
    save() {
      // console.log(this.tableList)
      this.$emit('fillIn', true)
    }
  },
}
</script>
<style lang="less" scoped>
@deep: ~'>>>';
.ant-table-fixed {
  margin: 0;
}
</style>